package org.permission.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Properties;
import java.util.Set;

public class ResourceUtils {

	public static Set<String> getPropertyKeys(String location) {
		InputStream is = ResourceUtils.class.getClassLoader().getResourceAsStream(location);
		Properties properties = new Properties();
		try {
			properties.load(is);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return properties.stringPropertyNames();
	}
	
	public static void main(String[] args) {
		Set<String> keys = ResourceUtils.getPropertyKeys("annonymousURLs.properties");
		System.out.println(keys);
		
	}
}
